package com.geekaca.d3;

import java.util.Scanner;

public class TestPassword {
    public static void main(String[] args) {
        /**
         * 测试输入密码比较
         */
        int myPasswd = 111111;
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("请输入密码");
            int inputPass = scanner.nextInt();
            if (inputPass == myPasswd) {
                System.out.println("密码输入正确");
                return;
            } else {
                System.out.println("密码输入错误,请重新输入");
            }
        }

    }
}
